﻿using System;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Controls.Primitives;

namespace NxChatQQ.Views.Pages
{
    /// <summary>
    /// MainPage.xaml 的交互逻辑
    /// </summary>
    public partial class MainPage : UserControl
    {
        public MainPage()
        {
            InitializeComponent();
        }

        private void MyButton_Click(object sender, RoutedEventArgs e)
        {
            //目标
            this.MyContextMenu.PlacementTarget = this.MyButton;
            //位置
            this.MyContextMenu.Placement = PlacementMode.Bottom;
            // 左键单击，显示上下文菜单  
            this.MyContextMenu.IsOpen = true;
        }


        private void MyButton_Initialized(object sender, EventArgs e)
        {
            MyButton.ContextMenu = null;
            //SymbolRegular.PersonAdd20
        }
    }
}
